package cn.jietuo.builder;


/**
 * @author zhangx & jietuo_zx@163.com
 * @version 1.0
 * @date 2021/3/7
 * @description: 建造者模式
 */
public class BuilderTest {

    public static void main(String[] args) {
        ProductBuilder builder = new DefaultConcreteProductBuilder();
        Director director = new Director(builder);
        Product product = director.makeProduct("YY语音", "欢聚时代", "part1", "part2");
        System.out.println(product);


        ProductBuilder specialConcreteProductBuilder = new SpecialConcreteProductBuilder();
        Director director2 = new Director(specialConcreteProductBuilder);
        Product product2 = director2.makeProduct("特殊YY语音", "特殊欢聚时代", "part1", "part2");
        System.out.println(product2);
    }
}
